    
	sampler s0;  
	float timeraslow=1.0;
	
    texture lightMask;  
    sampler lightSampler = sampler_state{Texture = lightMask;};  
      
    float4 PixelShaderLight(float2 coords: TEXCOORD0) : COLOR0  
    {  
        float4 color = tex2D(s0, coords);  
        float4 lightColor = tex2D(lightSampler, coords);  
        return color * lightColor;  
    }  

	float4 PixelShadeGray(float2 coords: TEXCOORD0) : COLOR0
	{
		float4 color = tex2D(s0, 1 - coords);
		
		color.rgb = color.gbr;
		return color;
	}
	float4 PixelShaderFunction(float2 coords: TEXCOORD0) : COLOR0  
    {  
	

	
		float4 Color;
		 coords.y = coords.y + (sin(timeraslow)*0.05);
	    coords.x = coords.x + (cos(timeraslow)*0.05);
	   	Color = tex2D( s0, coords.xy);
	    return Color;
		
    }  
      
    technique Technique1  
    {  
        pass Pass1  
        {  
            PixelShader = compile ps_2_0 PixelShaderFunction();  
        }  

		pass Pass2
		{
			PixelShader = compile ps_2_0 PixelShadeGray();
		}

		pass Pass3
		{
			PixelShader = compile ps_2_0 PixelShaderLight();
		}
    }  